/*  Copyright (C) Microsoft Corporation, 1997.  All rights reserved.

  This source code is intended only as a supplement to Microsoft
  Development Tools and/or on-line documentation.  See these other
  materials for detailed information regarding Microsoft code samples.

*/
//---------------------------------------------------------------------------
// StatBar.h - Header for implementation of status bar class
//

#ifndef __STATBAR_H__
#define __STATBAR_H__

#include <windows.h>
#include <commctrl.h>

#define N_SBAR_PARTS	2
#define SBAR_PART_STATUS	0
#define SBAR_PART_PROGRESS	1
#define ID_STATUSBAR	2010
//#define SBAR_PART_RECORDERMODE 1
//#define SBAR_PART_PROJMODE  2


//---------------------------------------------------------------------------
// Simple Status Bar Helper Class
//---------------------------------------------------------------------------
class CStatusBar
{
protected:
	HWND m_hwndStatus;
	int m_iHeight;

	int m_aWidths[N_SBAR_PARTS];

public:
	CStatusBar() : m_hwndStatus(NULL) { }
	~CStatusBar() { }
	HRESULT Create(HWND hwndParent);

	HWND GetHWND() { return m_hwndStatus; }
	int GetHeight() { return m_iHeight; }

	void SetText(LPCTSTR szText, int iPart = 0) { SendMessage(m_hwndStatus, SB_SETTEXT, iPart, (LPARAM)szText); }
	void GetText(LPTSTR szText, int iPart = 0) { SendMessage(m_hwndStatus, SB_GETTEXT, iPart, (LPARAM) (LPSTR) szText); }
	void OnSize(int iWidth, int iHeight);
};


#endif // !defined(__STATBAR_H__)

